package com.song.controller;

import com.song.pojo.JobOption;
import com.song.pojo.Result;
import com.song.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    private ReportService reportService;
    //获取员工职位详情
   @GetMapping("empJobData")
    public Result getEmpsJobDetail(){
        log.info("获取员工职位详情");
        JobOption jobOption = reportService.getEmpsJobDetail();
        return Result.success(jobOption);
    }
    //获取员工性别详情
    @GetMapping("empGenderData")
    public Result getEmpsGenderDetail(){
        log.info("获取员工性别详情");
        return Result.success(reportService.getEmpsGenderDetail());
    }
    //获取学生学历详情
    @GetMapping("studentDegreeData")
    public Result getStudentsDegreeDetail(){
        log.info("获取学生学历详情");
        return Result.success(reportService.getStudentsDegreeDetail());
    }
    //获取班级学生数量详情
    @GetMapping("studentCountData")
    public Result getStudentCountData(){
        log.info("获取班级学生数量详情");
        return Result.success(reportService.getStudentsCountDetail());
    }
}
